package com.jt.common.util;

import org.apache.commons.codec.binary.Base64;
/**
 * Created with IntelliJ IDEA. User: zhaoqiubo Date: 15/7/1 Time: 下午4:56
 * Base64加密类
 */

public class Base64Util {

	public static String encodeBase64(String str) {
		byte[] b = Base64.encodeBase64(str.getBytes());
		return new String(b);
	}

	public static String decodeBase64(String str) {
		byte[] b = Base64.decodeBase64(str.getBytes());
		return new String(b);
	}
}
